﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace Elasticsearch.Synchronize.Repository.MongoDbDTO
{
    public class BaseDTO
    {
        [BsonId]
        [BsonRepresentation(BsonType.ObjectId)]
        public string _id { get; set; }

        public int CreateBy { get; set; }

        [BsonDateTimeOptions(Kind = DateTimeKind.Local), JsonConverter(typeof(IsoDateTimeConverter))]
        public DateTime CreateTime { get; set; }

        public int UpdateBy { get; set; }

        [BsonDateTimeOptions(Kind = DateTimeKind.Local), JsonConverter(typeof(IsoDateTimeConverter))]
        public DateTime UpdateTime { get; set; }

    }
}
